package com.lxh.lxhcrm.model.pojos;

import javax.persistence.*;
import java.util.Date;

@Entity
@Table(name="oppo_exam",schema = "lxh_crm", catalog = "")
public class OppoExam {
    private int oeId;
//    private Integer oppoId;     //多对一
    private Opportunity oppo;
//    private Integer empId;      //多对一
    private Emp emp;
    private Date examDate;
    private Integer result;     //1为通过，2为驳回
    private String reason;      //理由

    @Id
    @Column(name = "oe_id", nullable = false)
    public int getOeId() {
        return oeId;
    }

    public void setOeId(int oeId) {
        this.oeId = oeId;
    }

    @ManyToOne(cascade = CascadeType.REFRESH)
    @JoinColumn(name = "oppo_id", referencedColumnName = "oppo_id")
    public Opportunity getOppo() {
        return oppo;
    }

    public void setOppo(Opportunity oppo) {
        this.oppo = oppo;
    }

    @ManyToOne(cascade = CascadeType.REFRESH)
    @JoinColumn(name = "emp_id", referencedColumnName = "emp_id")
    public Emp getEmp() {
        return emp;
    }

    public void setEmp(Emp emp) {
        this.emp = emp;
    }

    @Basic
    @Column(name = "exam_date", nullable = true)
    public Date getExamDate() {
        return examDate;
    }

    public void setExamDate(Date examDate) {
        this.examDate = examDate;
    }

    @Basic
    @Column(name = "result", nullable = true)
    public Integer getResult() {
        return result;
    }

    public void setResult(Integer result) {
        this.result = result;
    }

    @Basic
    @Column(name = "reason", nullable = true)
    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }
}
